package main

import (
	"github.com/nntaoli-project/goex"
	"github.com/nntaoli-project/goex/builder"
	"log"
	"os"
)

func main() {
	os.Setenv("HTTPS_PROXY", "socks5://127.0.0.1:4781")

	mybuilder := builder.DefaultAPIBuilder
	if os.Getenv("HTTPS_PROXY") != "" {
		mybuilder.HttpProxy(os.Getenv("HTTPS_PROXY"))
	}
	api := mybuilder.Build(goex.BINANCE) //创建现货api实例
	log.Println(api.GetExchangeName())
	log.Println(api.GetTicker(goex.BTC_USDT)) //获取ticker

}
